#!/bin/bash

cd $(dirname $(realpath $0))

# TODO make these not override external settings
export RUST_LOG=trace,sqlx::query=warn,sled=warn,aspect_db=trace,hyper=info,ecksport_core=trace,ecksport_net=trace,soketto=debug
export RUST_BACKTRACE=1

# also figure out the bins path
pushd .. > /dev/null
if [ "$CARGO_DEBUG" = 1 ]; then
	export PATH=$(realpath target/debug/):$PATH
else
	export PATH=$(realpath target/release/):$PATH
fi
popd > /dev/null

./entry.py $@
